<?php
namespace Common\Behavior;
use Think\Behavior;

/**
 * 登录验证
 * Class LoginAuthBehavior
 * @package Common\Behavior
 */
class LoginAuthBehavior extends Behavior {
    public function run(&$params)
    {
        $UserDao = D('Common/User');
        if (!$UserDao->isLogin()) {
            redirect(main_url('User/Login/index'));
        }
    }
}